package crmdna.list;

import java.util.regex.Pattern;

import crmdna.common.Utils;

public class ListShardProp {

	public ListShardProp() {
	}

	ListShardProp(String listShardId) {
		String[] split = listShardId.split(Pattern.quote(ListCore.DELIMITER));

		if (split.length != 2)
			Utils.throwIncorrectSpecException("Invalid listShardId ["
					+ listShardId + "]");

		listId = Utils.safeParseAsLong(split[0]);
		shardNo = Utils.safeParseAsInt(split[1]);
	}

	long listId;
	int shardNo;
}
